#ifndef _MAIN_H
#define _MAIN_H

#include "STC8G.h"
#include "intrins.h"

#include "uart.h"
#include "tim.h"
#include "eeprom.h"


#define SYSCLK (22118400)
#define SYSCLK_12 (1843200)
#define DEF_T0_OUT_FREQ  (25)

#define int8_t signed char
#define int16_t signed short int
#define int32_t signed long
#define uint8_t unsigned char
#define uint16_t unsigned short int
#define uint32_t unsigned long

#define u8  unsigned char
#define u16 unsigned short int
#define u32 unsigned long



typedef enum work_mode
{
	SET_MODE,
	TRANS_MODE,
	SILENCE_MODE,
	MAX_MODE_NUM,
} work_mode_e;

extern uint16_t xdata task1;
extern uint16_t xdata task2;


//     /* exact-width signed integer types */
// typedef   signed          char int8_t;
// typedef   signed short     int int16_t;
// typedef   signed           long int32_t;
// typedef int bool ;

//     /* exact-width unsigned integer types */
// typedef unsigned          char uint8_t;
// typedef unsigned short     int uint16_t;
// typedef unsigned           long uint32_t;

#endif
